package com.arpa.wms.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 库存
 * </p>
 *
 * @author LEO
 * @since 2020-08-04
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("wms_inventory")
@ApiModel(value="Inventory对象", description="库存")
public class Inventory extends BasicEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "数据标识")
    @TableField("code")
    private String code;


    @ApiModelProperty(value = "所属机构Code")
    @TableField("group_code")
    private String groupCode;

    @ApiModelProperty(value = "仓库")
    @TableField("warehouse_code")
    private String warehouseCode;

    @ApiModelProperty(value = "库区")
    @TableField("warehouse_space_code")
    private String warehouseSpaceCode;

    @ApiModelProperty(value = "入驻商")
    @TableField("shipment_code")
    private String shipmentCode;

    @ApiModelProperty(value = "入驻商")
    @TableField("shipment_name")
    private String shipmentName;

    @ApiModelProperty(value = "商品code")
    @TableField("goods_code")
    private String goodsCode;

    @ApiModelProperty(value = "商品编码")
    @TableField("good_code")
    private String goodCode;

    @ApiModelProperty(value = "商品条码")
    @TableField("goods_bar_code")
    private String goodsBarCode;

    @ApiModelProperty(value = "商品名称")
    @TableField("goods_name")
    private String goodsName;

    @ApiModelProperty(value = "商品规格")
    @TableField("spec")
    private String spec;

    @ApiModelProperty(value = "保质期（天）")
    @TableField("expiration_quantity")
    private BigDecimal expirationQuantity;

    @ApiModelProperty(value = "单位")
    @TableField("goods_unit")
    private String goodsUnit;

    @ApiModelProperty(value = "单位名称")
    @TableField("unit_name")
    private String unitName;

    @ApiModelProperty(value = "数量")
    @TableField("quantity")
    private BigDecimal quantity;

    @ApiModelProperty(value = "占用数量")
    @TableField("use_quantity")
    private BigDecimal useQuantity;

    @ApiModelProperty(value = "库位")
    @TableField("location")
    private String location;

    @ApiModelProperty(value = "库存批次")
    @TableField("lot")
    private String lot;

    @ApiModelProperty(value = "库存批次（所有字段都拼接）")
    @TableField("full_lot")
    private String fullLot;

    @ApiModelProperty(value = "收货批次")
    @TableField("receive_lot")
    private String receiveLot;

    @ApiModelProperty(value = "版本号")
    @TableField("version")
    @Version
    private Integer version;

    @ApiModelProperty(value = "生产日期")
    @TableField("gmt_manufacture")
    private LocalDateTime gmtManufacture;

    @ApiModelProperty(value = "过期日期")
    @TableField("gmt_expire")
    private LocalDateTime gmtExpire;

    @ApiModelProperty(value = "存货日期")
    @TableField("gmt_stock")
    private LocalDateTime gmtStock;

    @ApiModelProperty(value = "供应商")
    @TableField("supplier")
    private String supplier;

    @ApiModelProperty(value = "序列号")
    @TableField("serial_number")
    private String serialNumber;

    @ApiModelProperty(value = "扩展1")
    @TableField("extend_one")
    private String extendOne;

    @ApiModelProperty(value = "扩展2")
    @TableField("extend_two")
    private String extendTwo;

    @ApiModelProperty(value = "扩展3")
    @TableField("extend_three")
    private BigDecimal extendThree;

    @ApiModelProperty(value = "扩展4")
    @TableField("extend_four")
    private BigDecimal extendFour;

    @ApiModelProperty(value = "扩展5")
    @TableField("extend_five")
    private LocalDateTime extendFive;

    @ApiModelProperty(value = "扩展6")
    @TableField("extend_six")
    private LocalDateTime extendSix;

    @ApiModelProperty(value = "锁定状态")
    @TableField("is_lock")
    private Integer isLock;

    @ApiModelProperty(value = "货品状态（待废弃）")
    @TableField("status")
    private String status;

    @ApiModelProperty(value = "货品状态")
    @TableField("goods_status")
    private String goodsStatus;


    @ApiModelProperty(value = "货品状态名称")
    @TableField("goods_status_name")
    private String goodsStatusName;

    @ApiModelProperty(value = "备注")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty(value = "是否临时库位库存;0:否；1：是")
    @TableField("is_temp_inventory")
    private Integer tempInventory;

    @ApiModelProperty(value = "临时库存关联的原库存单号，用于返还库存使用")
    @TableField("old_inventory_code")
    private String oldInventoryCode;

    @ApiModelProperty(value = "临时库存关联的主单号；如收货单号、发货单号")
    @TableField("temp_code")
    private String tempCode;

    @ApiModelProperty(value = "临时库存关联的子单号；如收货单明细号、发货单明细号")
    @TableField("temp_item_code")
    private String tempItemCode;

    @ApiModelProperty(value = "临时库存关联的确认单号；如收货登记单号、发货分配单号")
    @TableField("temp_register_code")
    private String tempRegisterCode;

    @ApiModelProperty(value = "容器号")
    @TableField("container_bar_code")
    private String containerBarCode;

    @ApiModelProperty(value = "作业状态，值可从InventoryJobStatusEnum取；working ：作业中； normal：正常；")
    @TableField("job_status")
    private String jobStatus;

    @ApiModelProperty(value = "原库位号，用于作业中库存返还时操作；")
    @TableField("old_location")
    private String oldLocation;

    @ApiModelProperty(value = "预打包快速匹配")
    @TableField("fast_matching")
    private String fastMatching;

}
